import request from '@/utils/request'

export default {
  //查询员工列表（带条件分页查询）
  selectByPage(page, limit) {
    return request({
      url: `/rbac/user/selectByPage?page=${page}&limit=${limit}`,
      method: 'get', 
    })
  },
  deleteById(id) {
    return request({
      url: `/rbac/user/deleteById/${id}`,
      method: 'delete', 
    })
  },
  add(user) {
    return request({
      url: `/rbac/user/add`,
      method: 'post', 
      data: user
    })
  },
  selectById(id) {
    return request({
      url: `/rbac/user/selectById?id=${id}`,
      method: 'get', 
    })
  },
  update(user) {
    return request({
      url: `/rbac/user/update`,
      method: 'put', 
      data: user
    })
  }
}

// export function login(data) {
//   return request({
//     url: '/rbac/user/login',
//     method: 'post',
//     data
//   })
// }


